package mspbots.cw.callbacks.config;

import mspbots.cw.common.converter.StringToLocalDateConverter;
import mspbots.cw.common.converter.StringToLocalDateTimeConverter;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.reactive.config.WebFluxConfigurer;

/**
 * com.mspbots.sync.config.AppConfig
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/6/6
 */
@Configuration
@Import({mspbots.cw.common.annotation.GlobalExceptionHandler.class})
public class AppConfiguration implements WebFluxConfigurer {

    @Override
    public void addFormatters(FormatterRegistry registry) {
        registry.addConverter(new StringToLocalDateTimeConverter());
        registry.addConverter(new StringToLocalDateConverter());
    }

}
